<?php

/**
 * @author Martin Pernica
 * @copyright 2009
 */
$_SESSION['step2'] = true;
$dirName = rtrim(dirname(str_replace("index.php", "", $_SERVER['PHP_SELF'])), '/\\');
$url = "http://$_SERVER[SERVER_NAME]" . $dirName . "/";
?>
<h2>Instalační složky</h2>
<table>

<tr><td>Instalační složka:</td><td><input name="realPath" id="realPath" size="50" value="<?php echo realpath("../"); ?>" /></td></tr>
<tr><td>Instalační adresa:</td><td><input name="urlPath" id="urlPath" size="50" value="<?php echo $url; ?>" /></td></tr>
</table>

<h2>Údaje k MySQL</h2>
<table>

<tr><td>Uživatel:</td><td><input type="text" name="sql_user" id="sql_user" size="50" value="<?php echo $_SESSION['mysql']['user'] ?>" /></td></tr>
<tr><td>Heslo:</td><td><input type="text" name="sql_pass" id="sql_pass" size="50" value="<?php echo $_SESSION['mysql']['pass'] ?>" /></td></tr>
<tr><td>Databáze:</td><td><input type="text" name="sql_db" id="sql_db" size="50" value="<?php echo $_SESSION['mysql']['db'] ?>" /></td></tr>
<tr><td>Host:</td><td><input type="text" name="sql_host" id="sql_host" size="50" value="<?php echo $_SESSION['mysql']['host'] ?>" /></td></tr>
<tr><td>Prefix tabulek:</td><td><input type="text" name="sql_prefix" id="sql_prefix" size="50" value="<?php echo $_SESSION['mysql']['prefix'] ?>" /></td></tr>
</table>

<h2>Údaje k FTP</h2>
<table>

<tr><td>Uživatel:</td><td><input type="text" name="ftp_user" id="ftp_user" size="50" value="<?php echo $_SESSION['ftp']['user'] ?>" /></td></tr>
<tr><td>Heslo:</td><td><input type="text" name="ftp_pass" id="ftp_pass" size="50" value="<?php echo $_SESSION['ftp']['pass'] ?>" /></td></tr>
<tr><td>Host:</td><td><input type="text" name="ftp_host" id="ftp_host" size="50" value="<?php echo $_SESSION['ftp']['db'] ?>" /></td></tr>
<tr><td>Povolit FTP (doporučujeme zaškrtnout):</td><td><input type="checkbox" name="ftp_on" id="ftp_on"<?php echo (intval($_SESSION['ftp_on']) == 0) ? '' : ' checked="checked"' ?> value="1" /></td></tr>
</table>

<h2>Ukázkové data</h2>
<table>

<tr><td>Instalovat ukázkové data (doporučujeme zaškrtnout):</td><td><input type="checkbox" name="sample_data" id="sample_data"<?php echo (intval($_SESSION['sample_data']) == 0) ? '' : ' checked="checked"' ?> value="1" /></td></tr>
</table>

<h2>Nastavení</h2>
<table>

<tr><td>Povolit SEO adresy (vyžaduje mod_rewrite):</td><td><input type="checkbox" name="seo" id="seo"<?php echo ($_SESSION['seo'] == '0') ? '' : ' checked="checked"' ?> value="1" /></td></tr>
</table>
<?php
$buttons_left .= VInstallater::PrintButton("cancel");

$buttons_right .= VInstallater::PrintButton("right");

$menu = "<li class=\"done\"><a href=\"index.php?p=1\"> 1. Kontrola</a></li>\n
<li class=\"done\"> <a href=\"index.php?p=2\">2. Licence</a></li>\n
<li class=\"now\"> 3. Nastavení</li>\n
<li> 4. Účet správce</li>\n
<li> 5. Přehled</li>\n
<li> 6. Instalace</li>\n
<li> 7. Výsledek instalace</li>\n";

?>